<template>
  <div class="search_box">
    <div class="search">
      <el-input v-model="form.left" :placeholder="leftMsg"></el-input>
      <el-input v-model="form.right" :placeholder="rightMsg"></el-input>
      <el-button plain @click="searchClientclick">搜索</el-button>
      <el-button type="warning" plain @click="clearinput">重置</el-button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        left: "",
        right: "",
      },
    };
  },
  props: ["leftMsg","rightMsg","search"],
  methods: {
    searchClientclick(){
        console.log(this.search);
    },
    clearinput() {
      this.form = {
        left: "",
        right: "",
      };
    },
  },
};
</script>

<style lang="less" scoped>
.search {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  .el-input {
    width: 50%;
    margin-right: 10px;
  }
  margin-bottom: 10px;
}
.search_box {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
</style>>
</style>